package top.frsf.mqtt.codec;

import io.netty.channel.CombinedChannelDuplexHandler;
import io.netty.handler.codec.mqtt.MqttDecoder;
import io.netty.handler.codec.mqtt.MqttEncoder;

/**
 * MQTT 协议编解码器
 *
 * @author He Kuntao
 * @since 2025/5/26 16:30
 */
public class MqttServerCodec extends CombinedChannelDuplexHandler<MqttDecoder, MqttEncoder> {

    public MqttServerCodec() {
        // MqttDecoder 单独维护缓冲区，有状态; MqttEncoder 无状态
        super(new MqttDecoder(), MqttEncoder.INSTANCE);
    }
}
